<% if current_user.present? %>
  <%= link_to(
        path,
        class: button_classes,
        title: text,
        method:,
        remote:,
        id: dom_id(model, id_option)
      ) do %>
    <%= render :content %>
  <% end %>
<% else %>
  <%= logged_button_to(
        path,
        resource: model,
        class: button_classes,
        title: t("decidim.shared.follow_button.log_in_before_follow"),
        params: req_params,
        'aria-haspopup': true,
        id: dom_id(model, id_option)
      ) do %>
    <%= render :content %>
  <% end %>
<% end %>
